package com.ikingtech.platform.service.system.organization.configuration;

import com.ikingtech.framework.sdk.component.api.CompOrganizationApi;
import com.ikingtech.platform.service.system.organization.service.CompOrganizationService;
import com.ikingtech.platform.service.system.organization.service.OrganizationService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tie yan
 */
@Configuration
public class CompOrganizationConfiguration {

    @Bean
    @ConditionalOnMissingBean({CompOrganizationApi.class})
    public CompOrganizationApi compOrganizationApi(OrganizationService service) {
        return new CompOrganizationService(service);
    }
}
